package com.huodongrili.calender.model;

import java.util.Date;

import android.os.Parcel;
import android.os.Parcelable;

public class Event implements Parcelable{

	private String id;
    private String title;
    private String start_time;
    private String content;
    private String ccode;
    private String sort;
    private int point;
    private String addr;
    private String link;
    private String source;
    private String end_time;
    private Date date;
    private Date endDate;
    private String dateStr;
    private int iyear;
    private int imonth;
    private int iday;

	public String getSource() {
		return source;
	}
	public void setSource(String source) {
		this.source = source;
	}
	public String getEnd_time() {
		return end_time;
	}
	public void setEnd_time(String end_time) {
		this.end_time = end_time;
	}
	public Date getDate() {
		return date;
	}
	public void setDate(Date date) {
		this.date = date;
	}
	public String getTitle() {
		return title;
	}
	public void setTitle(String title) {
		this.title = title;
	}
	public String getSTime() {
		return start_time;
	}
	public void setSTime(String time) {
		this.start_time = time;
	}
	public String getId() {
		return id;
	}
	public void setId(String id) {
		this.id = id;
	}
	public String getContent() {
		return content;
	}
	public void setContent(String content) {
		this.content = content;
	}
	public String getCcode() {
		return ccode;
	}
	public void setCcode(String ccode) {
		this.ccode = ccode;
	}
	public String getSort() {
		return sort;
	}
	public void setSort(String sort) {
		this.sort = sort;
	}
	public int getPoint() {
		return point;
	}
	public void setPoint(int point) {
		this.point = point;
	}
	public String getAddr() {
		return addr;
	}
	public void setAddr(String addr) {
		this.addr = addr;
	}
	public String getLink() {
		return link;
	}
	public void setLink(String link) {
		this.link = link;
	}
	public int getIyear() {
		return iyear;
	}
	public void setIyear(int iyear) {
		this.iyear = iyear;
	}
	public int getImonth() {
		return imonth;
	}
	public void setImonth(int imonth) {
		this.imonth = imonth;
	}
	public int getIday() {
		return iday;
	}
	public void setIday(int iday) {
		this.iday = iday;
	}
	
	public String getDateStr() {
		return dateStr;
	}
	public void setDateStr(String dateStr) {
		this.dateStr = dateStr;
	}
	
	public Date getEndDate() {
		return endDate;
	}
	public void setEndDate(Date endDate) {
		this.endDate = endDate;
	}
	
	
	
	@Override
	public int describeContents() {
		return 0;
	}
	@Override
	public void writeToParcel(Parcel dest, int flags) {
		dest.writeString(id);
		dest.writeString(title);
		dest.writeString(start_time);
		dest.writeString(content);
		dest.writeString(ccode);
		dest.writeString(sort);
		dest.writeInt(point);
		dest.writeString(addr);
		dest.writeString(link);
		dest.writeString(source);
		dest.writeString(end_time);
		dest.writeString(dateStr);
		dest.writeInt(iyear);
		dest.writeInt(imonth);
		dest.writeInt(iday);
		
	}


	public static final Parcelable.Creator<Event> CREATOR = new Creator<Event>(){

		@Override
		public Event createFromParcel(
				Parcel source) {
			
			Event event = new Event();
			event.id = source.readString();
			event.title = source.readString();
			event.start_time = source.readString();
			event.content = source.readString();
			event.ccode = source.readString();
			event.sort = source.readString();
			event.point = source.readInt();
			event.addr = source.readString();
			event.link = source.readString();
			event.source = source.readString();
			event.end_time = source.readString();
			event.dateStr = source.readString();
			event.iyear = source.readInt();
			event.imonth = source.readInt();
			event.iday = source.readInt();
			
			return event;
		}

		@Override
		public Event[] newArray(int size) {
			return new Event[size];
		}
		
	};
	
}
